package light.head.dao.site;

import java.io.Serializable;
import java.util.List;

import light.head.framework.base.BaseDAO;
import light.head.model.CertificatesAnnex;

import org.springframework.stereotype.Service;

@Service
public class CertificatesAnnexDAO extends BaseDAO<CertificatesAnnex, Serializable>{
	private static final String sql_getByCc = "FROM CertificatesAnnex cera WHERE cera.deleted = 0 AND cera.cc = ? ";
	private static final String sql_indexList = "FROM CertificatesAnnex cera WHERE cera.deleted = 0 AND cera.cc = ? AND cera.cover = 1";
	public List<CertificatesAnnex> getByCc(Integer code){
		return super.find(sql_getByCc, code);
	}
	
	public CertificatesAnnex getIndexList(Integer code){
		return (CertificatesAnnex)super.get(sql_indexList, code);
	}
}
